
public class Move {
	public Square from;
	public Square to;
	
	
	public Move(String moveString)
	{
		String [] move = moveString.split("-");
		
		this.from = new Square(move[0]);
		this.to = new Square(move[1]);
	}//end constructor
	
	public Move(Square from, Square to)
	{
		this.from = from;
		this.to = to;
	}

	public String toString()
	{
		char firstChar  = (char)('a' + (from.col - 1));
		char secondChar = (char)('a' + (to.col - 1));
		return (String.valueOf(firstChar)+String.valueOf(from.row)+"-"+String.valueOf(secondChar)+String.valueOf(to.row));
	}//endmethod
	
	public boolean equals(Move o)
	{
		return (this.from.row == o.from.row && this.from.col == o.from.col && this.to.row == o.to.row && this.to.col == o.to.col);
	}
	
}//end class
